// 导出数据对象
export default {
    namespaced: true,
    state: {
        // 总的数据
        allzj: [],
        // 当前章节
        nowzj: 0,
        // 当前内容
        nownr: '',
        // 当前页数
        nowys: 0,
        // 哪个途径来的 false为正常跳转，true为从目录跳转
        nld: false
    },
    mutations: {
        changebookallzj(state, value) {
            state.allzj = value
        },
        changebooknowzj(state, value) {
            state.nowzj = value
                // console.log("当前设置的", state.nowzj)
        },
        changebooknownr(state, value) {
            state.nownr = value
        },
        changebooknowys(state, value) {
            state.nowys = value
        },
        changebooknld(state, value) {
            state.nld = value
        },
    },
    actions: {
        setbookallzj(content, value) {
            content.commit("changebookallzj", value)
        },
        setbooknowzj(content, value) {
            content.commit("changebooknowzj", value)
        },
        setbooknownr(content, value) {
            content.commit("changebooknownr", value)
        },
        setbooknowys(content, value) {
            content.commit("changebooknowys", value)
        },
    },
    modules: {}
}